#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <mouse/mouse.h>
#include "ms_get.h"

struct mouse_status mouse_status;

int
ms_get_info(void)
{
	int iRetVal;

	if((iRetVal = ms_cmd(MS_GET_DATA, (void *) &mouse_status, sizeof(mouse_status))) != 0)
		printf("ms_get_info: Error while reading mouse status information\n");

	return iRetVal;
}

int
ms_get_x(void)
{
	return mouse_status.x;
}

int
ms_get_y(void)
{
	return mouse_status.y;
}

int
ms_get_left(void)
{
	return mouse_status.left_button;
}

int
ms_get_right(void)
{
	return mouse_status.right_button;
}

